import request from '@/utils/request'

// 查询请购计划列表
export function listRequisition(query) {
  return request({
    url: '/requisition/requisition/list',
    method: 'get',
    params: query
  })
}

// 查询请购计划详细
export function getRequisition(requisitionId) {
  return request({
    url: '/requisition/requisition/' + requisitionId,
    method: 'get'
  })
}

// 新增请购计划
export function addRequisition(data) {
  return request({
    url: '/requisition/requisition',
    method: 'post',
    data: data
  })
}

// 修改请购计划
export function updateRequisition(data) {
  return request({
    url: '/requisition/requisition',
    method: 'put',
    data: data
  })
}

// 删除请购计划
export function delRequisition(requisitionId) {
  return request({
    url: '/requisition/requisition/' + requisitionId,
    method: 'delete'
  })
}

  // 审核
  export function auditRequisition(data) {
    return request({
      url: '/requisition/requisition/audit',
      method: 'put',
      data: data
    })
  }
